<?php

function get_group_user_count($group_id) {
    global $aldb;
    return $aldb->get_var("SELECT COUNT(id) FROM $aldb->users WHERE group_id='$group_id'");
}

function get_group_user_posts_count($group_id) {
    global $aldb;
    return $aldb->get_var("SELECT COUNT(p.id) FROM $aldb->users as u LEFT JOIN $aldb->posts as p ON u.id=p.poster_id WHERE u.group_id='$group_id'");
}
?>
